﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FizzWare.NBuilder;

namespace VMWorkshop.Domain
{
    public class ProductRepository : IProductRepository
    {
        public ProductRepository() { }

        public IList<Product> GetAll()
        {
            IList<Product> products = Builder<Product>.CreateListOfSize(10).Build();
            return products;
        }

        public Product GetProductById(int productId)
        {
            IList<Product> products = this.GetAll();
            return products[productId - 1];
        }

        public void Persist(Product product)
        {
            //do something here to persist changes
        }
    }
}
